// Date object contains 3 integers representing the day, month and year.
// Year is repesented as a 2-digit number, i.e. 2013 is represented as 13.
// Has overloaded comparison operators to compare two date objects.

//@author A0099619J

#ifndef DATE_H
#define DATE_H

#include <iostream>
#include <string>
#include <ctime>

#define NULL_DATE Date(99, 99, 99)

class Date
{
private:
	static const int daysInMonth[];
	static const std::string months[];
	static const std::string weekDays[];
	static Date sevenDaysLater;

	int year;
	int month;
	int day;
public:
	Date();
	Date(int, int, int);

	static Date getCurrentDate();
	static bool isLeapYear(int);
	std::string formatDate();
	int dayOfWeek();
	bool isValidDate();
	static void updateSevenDaysLater();

	int getYear();
	int getMonth();
	int getDay();

	bool operator<(const Date&) const;
	bool operator<=(const Date&) const;
	bool operator>(const Date&) const;
	bool operator>=(const Date&) const;
	bool operator==(const Date&) const;
	bool operator!=(const Date&) const;
	Date operator+(const int&) const;

	friend std::ostream& operator<<(std::ostream&, const Date&);
};

#endif